home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
19
/
madtrb11.zip
/
INKEY.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-07-13
|
904b
|
37 lines
PROGRAM KeyDemo;
{$C-}
{
Demonstration program for InKey function
Source: "INKEY: A Multiple Keypress Function", TUG Lines Volume I Issue 4
Author: Orville Jenkins/Panther Associates/Dallas-Ft.Worth,Texas/
Application: MS-DOS, PC-DOS
}
var
specialkey : boolean;
command : char;
{$I INKEY.INC}
begin
clrscr;
writeln('INKEY DEMO - Press any key - Press F10 to quit');
writeln;
command := #00;
repeat
if inkey(specialkey,command)
then
begin { Tell caller the value of the key }
if specialkey
then writeln('That''s a SPECIAL key - the ascii code is ',ord(command))
else writeln('That''s a REGULAR key - the ascii code is ',ord(command));
writeln;
if command <> #68
then writeln('INKEY DEMO - Press any key - Press F10 to quit');
writeln;
end;
until command = #68; { That is, the F10 key }
end. {Program KeyDemo}